<template>
	<view class="qrcode">
		<u-sticky offset-top="200">
			<view>
				<u-button type="primary" class="scancode" @click="scancode">扫描二维码</u-button>
			</view>
		</u-sticky>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				scanCode: '',
				point: ''

			}
		},
		methods: {
			scancode: function() {
				let _self = this;
				uni.scanCode({
					onlyFromCamera: true,
					success: res => {
						console.log(res);
						_self.scanCode = res;
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.qrcode{
		margin: 0 30rpx;
	}
</style>
